package com.icss.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.icss.model.Cart;
import com.icss.model.Item;

public interface CartDao {
	@Insert("insert into cart values(default,#{user_id},#{item_id},#{price})")
	public int addcart(Cart cart);
	
	@Select("select * from item where id in (select item_id from cart where user_id = #{id})")
	public List<Item> findByuserId(int id);
}
